package com.xlh.wjdcserver.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.servers.Server;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.List;

@Configuration
public class SwaggerConfiguration {
    @Bean
    public OpenAPI customOpenAPI() {
        return new OpenAPI()
                .info(new Info()
                        .title("问卷调查 API 文档")
                        .version("1.0")
                        .description("问卷调查接口说明")
                        .contact(new Contact().name("小力宏").email("1395037559@qq.com").url(""))
                )
                .servers(List.of(
                new Server().url("/")  // 这里改成你后端实际运行的端口
        ));
    }
}

